package com.example.java3mysql2.instrastructure;

import com.example.java3mysql2.domain.Community;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import javax.transaction.Transactional;

@Repository
public interface JpaCommunity extends JpaRepository<Community,Long> {

    Community findByCommunityCode(String code);
    @Transactional
    void deleteByCommunityCode(String code);
}
